package net.lzzy.practices.entities;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

/**
 * 实体类：申请者
 * <p>
 * 继承自 BaseEntity，表示这是一个数据库实体类。
 * 该类用于表示学生申请课程的相关信息。
 *
 * @author 作者名
 * @version 1.0
 * @since 日期
 */
@Entity
@Getter
@Setter
public class Applicant extends BaseEntity {
    @Transient
    public static  final int STATUS_APPLYING = 0;

    @Transient
    public static  final int STATUS_APPROVED = 1;

    @Transient
    public static  final int STATUS_DECLINED = 2;

    private int status;

    @Temporal(TemporalType.TIMESTAMP)
    private Date applyTime;

    @ManyToOne
    private User student;

    @ManyToOne
    private Course course;

    public Applicant() {
        applyTime = new Date();
    }
}
